package com.qf.smartdevice.mapper;

import com.qf.smartdevice.pojo.SysDevice;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

/**
 * @author 王博康
 * @version 1.0
 * @project devicemanagementsystem
 * @description: TODO
 * @date 2022/3/25 1:07 星期五
 */
public interface SysDeviceMapper {



    @Insert("insert into sys_device (device_id,device_name,categy_id,bind_user_id,scene_id,bind_time) values(#{deviceId},#{deviceName},#{categyId},#{bindUserId},#{sceneId},#{bindTime})")
    int addSysDevice(SysDevice sysDevice);


    @Select("select * from sys_device where device_id=#{deviceId}")
    SysDevice findById(String deviceId);

    void updateDeviceById(SysDevice sysDevice);
}
